fix(codeql): wake required jobs with the exchanged target app token - #2040
fix(codeql): wake required jobs with the exchanged target app token#2040seonghobae wants to merge 150 commits into
Conversation
Preserve the existing four-file rerun recovery delta without emitter or concurrency policy changes. Local contract verification: 144 passed, 2 failed. Existing verdict-reader fixtures still expect the pre-pagination gh invocation; these files and the requester are unchanged from bf732f9. Workflow actionlint and diff checks passed. No hosted dispatch or push performed. Signed-off-by: Seongho Bae <me@seonghobae.me>
Match exact gh arguments and page-shaped responses. Preserve trusted-publisher assertions and exercise second-page success and failure after a full page of forged statuses. Signed-off-by: Seongho Bae <me@seonghobae.me>
Request PR state in GraphQL and preserve it in REST normalization. Reject missing state and empty or malformed heads before OpenCode dispatch, Strix dispatch, or Strix job rerun. Preserve explicit positive fixtures and add fail-closed regressions. Focused RED: 17 failed, 19 passed; final scheduler regressions: 380 passed under both normal and GITHUB_ACTIONS=true environments with warnings treated as errors. No dispatch, permission, queue, or cancellation policy changes. Signed-off-by: Seongho Bae <me@seonghobae.me>
Validate selected check, job, run, workflow and publisher before rerunning Strix. Preserve PR-target base-SHA executions through association and target-title checks; defer dispatch runs without authenticated target provenance. Local mock-only regressions: 402 passed in normal and CI environments with warnings treated as errors. No token, permission, queue or cancellation changes. Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Block terminal status publication and exact-job wake when SARIF upload does not succeed. Preserve existing finding verdicts and document the unresolved receipt boundary. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Compare already-fetched live base identity with event inputs before status consumption. Keep historical verdict provenance and artifact authority as unresolved follow-ups. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Supply the real base repository, ref and SHA required by the production dispatch shell. Preserve later-attempt redispatch coverage without weakening the live-base guard. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Merge exact 82ca0b8 into the handoff branch. Consolidate equivalent publication regressions and SARIF documentation while preserving live-base validation and rerun fixtures. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Exact-head protected-main reconciliation and Runtime Quality repairRuntime Quality run Repaired by ordinary non-force reconciliation with fresh protected
Exact-tree verification:
Fresh exact-head runs were created by this substantive reconciliation (no manual rerun or source-neutral trigger): Runtime Quality The PR remains Draft / Proposed. There is no qualifying independent review for |
seonghobae
left a comment
There was a problem hiding this comment.
P1 current-head carryover for 85522306949bada2b5939608dc911f6374125f1b; this is the same unresolved rollout/admission defect recorded on predecessor review 5185935507, not a second blocker.
The non-force reconciliation onto protected main@fb17ef556f94f673234aa557254ae52779e9a7b0 is valid and preserves the scheduler/replay-gate/Runtime Quality repairs. Fresh compare shows the 17 commits since a9b18b4b... change Runtime Quality, JavaScript materializer, README/queue docs, and test placement only. Neither CodeQL workflow changed. Protected main's handler still has matrix-owned Wake exact CodeQL required job and no run-wide settle-required-run; its client still uses the pre-cutover title without producer_source_sha. This PR's client still admits only the post-cutover title/receipt. The circular self-validation boundary therefore remains unchanged.
Keep this Draft/Proposed until the already-recorded RED -> GREEN is implemented: versioned backward-compatible handler bootstrap on protected main, exact provenance-bound temporary legacy discovery, one deterministic full-language settlement owner with the split-wake fixture, then ordinary non-force restack and fresh terminal CodeQL evidence. Update ADR-0025 and the product-technical gap baseline with the staged removal condition.
Fresh runs 34686930839, 34686930820, 34686930788, 34686930801, 34686930789, and 34686930806 were nonterminal at review time except Trusted uv Materializer Quality CI, which was successful. Do not transfer predecessor GREEN or use manual rerun, Draft/Ready retrigger, synthetic status, source-neutral commit, auto-merge, or bypass.
|
Hosted follow-up on unchanged exact head |
|
Handler prerequisite successor #2105 advanced non-force to exact |
|
Fresh dependency/ownership update from the BandScope downstream canary: handler-bootstrap #2105 has advanced by ordinary non-force reconciliation to exact Keep #2040 Draft and do not create a second handler-bootstrap implementation while #2105 is mutable. After #2105 reaches protected |
|
Source-level succession check after the ancestry check: #2040 does not currently subsume #2105's handler bootstrap. On exact Therefore keep both PRs: #2105 remains the canonical bounded handler-bootstrap owner until normal protected integration; #2040 must adopt that released/protected contract by ordinary non-force reconciliation afterward. Do not close #2105 as 'already inherited' and do not independently reimplement its schema/attempt-budget contract on #2040 while #2105 is mutable. |
Protected-handler terminal resultExact producer run 34687138251 for Both CodeQL analyses and SARIF gates completed successfully. The Keep #2040 Draft/open. Merge #2105 through ordinary protection first, non-force reconcile #2040 onto that protected tip, then require a fresh exact producer → protected-handler canary. Do not rerun the unchanged leaf, synthesize status, or reuse the successful |
|
Fresh prerequisite correction for this Draft owner: canonical handler bootstrap #2106 has advanced to exact |
|
BandScope downstream owner-path refresh (read-only dependency handoff): canonical bootstrap prerequisite #2106 is now Open/Ready/mergeable at exact |
Current protected-main consumer RED — 2026-09-12The proposed combined owner repair is still required by fresh consumers running protected
This strengthens the exact acceptance requirement for #2040: one immutable producer must publish terminal per-language evidence and coordinate the exact-run wake using an Actions-capable least-privilege target credential. A successful scan artifact without publication/wake remains fail-closed. No consumer workflow copy, synthetic status, or blind leaf rerun is acceptable. |
|
Prerequisite authority refresh for this Draft consumer/producer stack:
Keep #2040 Draft and do not restack yet. Its canonical next action remains ordinary non-force merge-forward onto the protected commit only after #2106 lands normally, then switch the producer to |
|
Current prerequisite authority correction from downstream BandScope exact-state sweep:
Please treat the body section that still names |
|
Additional exact-current-head consumer evidence (2026-09-12): All three compatibility shards admitted the live PR/base/head and returned The consumer's full product suite independently passed 3602 tests, so this evidence is not a leaf test or SARIF finding. No rerun, synthetic status, or copied workflow was introduced. |
|
Additional exact-current-head settlement-race evidence (2026-09-12 UTC):
Keep fail-closed. Do not manually rerun, synthesize a status, or copy the producer into the consumer. #2040 remains the canonical owner for terminal receipt publication and exact-run settlement. |
2026-09-12 UTC settlement RED after terminal dispatch
The resulting attempt created new compatibility jobs |
Exact-head downstream settlement reproduction — 2026-09-13
The same exact head has GREEN Runtime Quality, Security, Python Security, and SAST. This is evidence for the canonical receipt/settlement owner, not a leaf-source finding and not permission to synthesize GREEN or reuse a predecessor verdict. No manual rerun was requested. |
|
Read-only prerequisite correction for downstream BandScope settlement: this PR body still names #2106 predecessor |
|
New protected-main canary for the post-bootstrap cutover: |
|
Fresh Orgmetra #64 canary reproduces the producer-after-consumer settlement ordering defect on a new exact head. Exact consumer:
Observed ordering:
Thus both required consumers terminal-failed before the exact-head producer dispatch even started. This is fresh evidence for the central bootstrap/settlement cycle; no Orgmetra no-op retrigger, copied workflow, synthetic status, or predecessor verdict is being used. Preserve this canary through the #2106 prerequisite and this canonical successor's ordinary reconciliation. |
|
Fresh immutable consumer canary from
RCA/acceptance: the exchanged target-repository App token is not sufficient authority to dispatch into the central |
Owner session:
fast-mlsirm-commercializationOutcome
Canonical combined successor for the central CodeQL producer/handler cycle, exact required-run recovery, strict head-envelope validation, and stacked-PR check admission.
Current authority after non-force reconciliation:
main@fb17ef556f94f673234aa557254ae52779e9a7b0;85522306949bada2b5939608dc911f6374125f1b;fe8ca79a4fd410e68eb790258820a511fa6cdc70;Root causes and repair retained
codeql-dispatch/<language>/<base_sha>receipts.pr_headschema/types and legacy scalar fields must agree.PR_REVIEW_MERGE_TOKEN→OPENCODE_APPROVE_TOKEN→ same-repository token fallback remains explicit and authenticated..github/main, not target-PR synthetic ancestry.branchesandbranches-ignorefilters.faileddispatch keeps one top-levelrequired_jobsauthority compatible with the protected pre-cutover handler; only whole-attemptalluses the nested envelope.The branch continues to carry all valid predecessor delta from #1902, #2004, #2043 and #2044. Those predecessors are not treated as shipped merely because their delta is inherited here.
Protected-main reconciliation
Fresh review found predecessor
6706c231ab06a3c91c43fdb5b989cfcd79fff593had diverged from current protected main by 144 ahead / 32 behind. The protected-side 32 commits affected eleven effective files and did not overlap this PR's 24 effective files. A concurrent central writer then performed the same ordinary merge-forward tree that had been independently prepared here:3b2de64c2c4c95c56d2f5099a480a0825304d038;6706c231...and protectedmain@cb0872c9...;eb8d6351193519afca23d448f70b9ab59f5eb5a4;The independently prepared tree had the identical SHA
eb8d635...; its ref update was correctly rejected as non-fast-forward after the concurrent merge landed first. The concurrent commit is therefore adopted rather than rewritten or force-replaced.Verification boundary
Historical predecessor suites remain diagnostic only after the merge-forward. Local verification for tree
da7514aa...is focused9 passed, scheduler/related336 passed, repository3127 passed / 1 skipped / 21 subtests, statement/branch/public-doc coverage 100%, and diff check clean. The exact head must still obtain fresh hosted current-head workflow, security, coverage and independent-review evidence before normal merge. CodeQL run34629071379attempt 50 was a zero-jobstartup_failureon predecessor head3b2de64c...; it is evidence for this repair, not authorization for the new head.This branch is the central prerequisite lane for the producer-after-consumer Required CodeQL failure repeatedly reproduced by fast-mlsirm exact heads. Do not repair that defect in product repositories through copied workflows, synthetic statuses, no-op retriggers, or bypasses.
Exact-head replay-gate repair
Current-head OpenCode run 34684439092, coverage job
103528902332, supplied the RED: the trustedpr_head_replay_guardobserved the intentional retirement of obsolete restamp tests intests/test_pr_review_merge_scheduler.pybut no added replacement test module, so it failed before coverage measurement.The repair moves the two positive no-mutation contracts into
tests/test_pr_review_merge_scheduler_source_neutral_commit_contract.py. It retains the complete scheduler test module and makes replacement evidence structurally visible to the protected guard. A transient Git-data upload commitbe25a767...truncated the large existing test blob; it was never promoted as valid evidence and the immediate ordinary child6476b919...restored the full blob. Fresh compare froma9b18b4b...to this head is exactly 46 lines moved out of the existing test module and 60 lines added in the replacement module, with no source or workflow path changed.Exact-tree verification: focused
9 passed / 325 deselected; full3127 passed / 1 skipped / 21 subtests; statement and branch coverage 100%; public-doc coverage 100%;git diff --checkclean; and the productionpr_head_replay_guardreports PASS with one added test file and no reverted protected-main path.Latest protected-main and Runtime Quality reconciliation
Runtime Quality run
34686471090on predecessor798a5d4f...failed because its selected canonical fixturetests/test_javascript_materializer_docstrings.pywas absent. Protected main had already merged the owner contract through #2095 and the queue-history contract through #2092. Ordinary two-parent commit85522306949bada2b5939608dc911f6374125f1bnow joins predecessor798a5d4f...with protectedmain@fb17ef55...at exact treefe8ca79a...; the overlapping Runtime Quality workflow preserves both the main-side JavaScript materializer contract and this PR's scheduler selector.Exact-tree verification is focused
72 passed, repository3133 passed / 1 skipped / 36 subtests, allscripts/ci/*.pystatement/branch coverage 100% (13,155statements /5,322branches), public-doc coverage 100%, compileall PASS, and diff checks clean. Exact-head Runtime Quality34686930839, Python Security34686930820, Trusted uv Materializer34686930788, Security34686930789, and SAST34686930806are GREEN. CodeQL34686930801is terminal failure only because actions job103535474643and python job103535474644both haveDISPATCH_OUTCOME=success,VERDICT_STATE=pending; no leaf source finding is inferred.Landing gate
Current-head review at
85522306949bada2b5939608dc911f6374125f1bconfirms the merge-forward itself is valid but the protected-main pre-cutover handler and this post-cutover client cannot yet validate one another. Keep Draft until a backward-compatible protected bootstrap, provenance-bound temporary legacy discovery, one run-wide settlement owner with split-wake fixture, ADR-0025/gap removal condition, ordinary restack, and fresh terminal CodeQL evidence are present. Normal merge requires terminal applicable checks, zero valid unresolved findings, and a qualifying independent current-head approval. No self-approval, auto-merge authorization, protection bypass, manual-rerun loop, synthetic status, force update, destructive rebase, source-neutral commit, predecessor-success transfer, or valid-delta close.Exact protected-handler prerequisite — 2026-09-12
The canonical owner prerequisite is now #2106 at exact head
50adc03d2afbe4a370782e9b7985636f0fcf12fc, based on protectedmain@fb17ef556f94f673234aa557254ae52779e9a7b0; its two parents are the prior canonical head2c163e92983156739bdeeac87bd8c21383c38145and complete overlapping predecessor #2105 headfde889ad611054cad0c1be5a14289b7eb881b124. It stages the backward-compatible v1/v2 handler, one shared concurrency owner, one run-wide settlement mutation, exact producer/base/head/ordered-parent provenance, split-language evidence, legacy-removal condition, and the credential-response isolation repair. Overlapping #2105 is Draft and remains evidence-preserving until protected integration is verified.Keep this consumer/producer stack Draft. After #2106 lands through ordinary protection, non-force merge-forward this branch onto the new protected tip, switch the producer to the versioned event, and require fresh exact-head terminal CodeQL plus independent review. The queued runs created by the corrected Ready transition do not waive this dependency and cannot authorize merge.